package net.jarang.android.saleoffline.domain;

public class SaleSearch {
	private String keyword;
	private String location;
	private String orderByType;

	public String getDisplay() {
		String display = "";
		boolean keywordYn = false;
		if (keyword != null) {
			display += keyword;
			keywordYn = true;
		}
		
		boolean locationYn = false;
		if (location != null) {
			display += (keywordYn)? " | " : "";
			display += location;
			locationYn = true;
		}
		
		if ("DATE".equals(orderByType)) {
			display += (locationYn)? " | " : "";
			display += "최신글순";
		}
		return display;
	}
	
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public String getOrderByType() {
		return orderByType;
	}
	public void setOrderByType(String orderByType) {
		this.orderByType = orderByType;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}
}
